class HuskgunClusterWFire extends HuskGunWFire;

function projectile SpawnProjectile(Vector Start, Rotator Dir)
{
	local Projectile p;

	if( HoldTime < (MaxChargeTime * 0.33) )
	{
		ProjectileClass = WeakProjectileClass;
	}
	else if( HoldTime < (MaxChargeTime * 0.66) )
	{
		ProjectileClass = default.ProjectileClass;
	}
	else
	{
		ProjectileClass = StrongProjectileClass;
	}

	p = Super.SpawnProjectile(Start, Dir);

	if( p == None )
		return None;

	if( HoldTime < (MaxChargeTime * 0.33) )
	{
		HuskGunClusterWProjectile_Weak(p).ImpactDamage *= HoldTime * 2.5;
		HuskGunClusterWProjectile_Weak(p).Damage *= (1.0 + (HoldTime/MaxChargeTime));// up to double damage
		HuskGunClusterWProjectile_Weak(p).DamageRadius *= (1.0 + (HoldTime/(MaxChargeTime/2.0)));// up 3x the damage radius
	}
	else if( HoldTime < (MaxChargeTime * 0.66) )
	{
		HuskGunClusterWProjectile(p).ImpactDamage *= HoldTime * 2.5;
		HuskGunClusterWProjectile(p).Damage *= (1.0 + (HoldTime/MaxChargeTime));// up to double damage
		HuskGunClusterWProjectile(p).DamageRadius *= (1.0 + (HoldTime/(MaxChargeTime/2.0)));// up 3x the damage radius
	}
	else
	{
		HuskGunClusterWProjectile_Strong(p).ImpactDamage *= MaxChargeTime * 2.5;
		HuskGunClusterWProjectile_Strong(p).Damage *= 2.0;// up to double damage
		HuskGunClusterWProjectile_Strong(p).DamageRadius *= 3.0;// up 3x the damage radius
	}
	return p;
}

defaultproperties
{
     WeakProjectileClass=Class'PerksSimHostOrg.HuskGunClusterWProjectile_Weak'
     StrongProjectileClass=Class'PerksSimHostOrg.HuskGunClusterWProjectile_Strong'
     FireRate=0.250000
     AmmoClass=Class'PerksSimHostOrg.HuskgunClusterWAmmo'
     ProjectileClass=Class'PerksSimHostOrg.HuskGunClusterWProjectile'
}
